<template>
    <fieldset>
        <legend>defineApi组件</legend>
        <parentCom></parentCom>
    </fieldset>
</template>
<script setup>
    //definProps defineEmits defineExpose
    import childCom from "./child.vue"
    import parentCom from  "./Parent.vue"
    import { onErrorCaptured } from "vue"

    onErrorCaptured((err,instance,inof) => {
        console.log('err====',err.toString());
        console.log('instance====',instance);
        console.log('inof====',inof);
        //可以阻止子组件错误的传播
        return false
    })

</script>